package cn.wolfcode.wolf2w.business.api.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/*
* ES库中的Stragegy实体类
* */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "destination")
//ES库名不能有大写，如果是6需要后面指定类型type，7不用
public class DestinationES {
    @Id
    private Long id;
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")//数据量不大，使用ik_max_word分词器
    //如果数据量大，使用ik_smart分词器
    private String name;
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String info;

}
